//
//  TalkingTableViewCell.m
//  QuanZiChat
//
//  Created by lanou3g on 15/11/25.
//  Copyright © 2015年 ZhongHongLin. All rights reserved.
//

#import "TalkingTableViewCell.h"
#import "Person.h"
#import "TalkRecord.h"

@interface TalkingTableViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *image;
@property (weak, nonatomic) IBOutlet UILabel *nameLable;
@property (weak, nonatomic) IBOutlet UILabel *lastContent;
@property (weak, nonatomic) IBOutlet UILabel *lasttime;


@end

@implementation TalkingTableViewCell

-(void)setPerson:(Person *)person{
    
    _person = person;
    self.image.image = [UIImage imageNamed:@"我的.jpg"];
    self.nameLable.text = person.username;
    for (TalkRecord *talk in person.contents) {
        NSString *time = talk.time;
        self.lasttime.text =  [time substringFromIndex:5];
        self.lastContent.text = talk.content;
    }

}



- (void)awakeFromNib {
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}
@end
